import React from 'react';
import ReactDOM from 'react-dom';
import { Toast } from 'antd-mobile'
import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';

function resizeFontsize () {
  (function (win, doc) {
  function change () {
      // 以psd图为375宽时，默认字体大小为 16  750时对应32
      // 这样图纸测量多少，直接写就行，不用重新换算
    doc.documentElement.style.fontSize = 32 * doc.documentElement.clientWidth / 750 + 'px'
  }
  change()
  win.addEventListener('resize', function () {

    change()
  }, false)
})(window, document)
}

React.$toast = Toast


ReactDOM.render(
  <React.StrictMode>
    <App />
  </React.StrictMode>,
  document.getElementById('root')
);

// resizeFontsize()
// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();
